Skip to content

Extract preview/sync GitHub Actions#4897

Open
backspace wants to merge 2 commits into
mainfrom
cs-11180-extract-shared-preview-realm-github-actions-to-monorepo
Open

Extract preview/sync GitHub Actions#4897
backspace wants to merge 2 commits into
mainfrom
cs-11180-extract-shared-preview-realm-github-actions-to-monorepo

Conversation

@backspace
Copy link
Copy Markdown
Contributor

@backspace backspace commented May 19, 2026

I noticed that boxel-home PR previews are broken:

image

This is because the interface to _publish-realm changed:

Publishing https://realms-staging.stack.cards/boxel_homepage_realm/boxel-home-pr-57/ to https://boxel_homepage_realm.staging.boxel.dev/boxel-home-pr-57/
Failed to publish realm (HTTP 202):
{
  "data": {
    "type": "published_realm",
    "id": "23ea3f2a-9c7a-4028-ad3a-7be647ed476b",
    "attributes": {
      "sourceRealmURL": "https://realms-staging.stack.cards/boxel_homepage_realm/boxel-home-pr-57/",
      "publishedRealmURL": "https://boxel_homepage_realm.staging.boxel.dev/boxel-home-pr-57/",
      "lastPublishedAt": "1778870465062",
      "status": "pending"
    }
  }
}

HTTP 202 is actually expected now!

I also noticed that boxel-catalog, boxel-home, and boxel-skills were all using duplicative bespoke workflows to accomplish similar tasks, with use of cardstack/boxel-cli, npm Boxel CLI, and the old workspace sync CLI.

This extracts the preview/sync workflows into the monorepo so they can be used from external repositories and tested in-monorepo in case of interface changes like the above.

@backspace backspace force-pushed the cs-11180-extract-shared-preview-realm-github-actions-to-monorepo branch from 037a389 to 79657eb Compare May 20, 2026 00:00
@backspace backspace changed the base branch from cs-11161-extract-workspace-sync-action to main May 20, 2026 00:01
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Observability diff (vs staging)

Show diff
diff --git a/tmp/remote-canon.Nq1dRP/dashboards/boxel-status/indexing.json b/tmp/committed-canon.XjD11i/dashboards/boxel-status/indexing.json
index a39cf75..25280b9 100644
--- a/tmp/remote-canon.Nq1dRP/dashboards/boxel-status/indexing.json
+++ b/tmp/committed-canon.XjD11i/dashboards/boxel-status/indexing.json
@@ -69,6 +69,10 @@
           "uid": "cef5v5sl9k7i8f"
         },
         "description": "System-wide operator action: queue a full reindex across every realm. The button disables itself while a `full-reindex` orchestration job is already pending or running. Per-realm reindex moved to the Realms dashboard. Click POSTs with `Authorization: Bearer ${grafana_secret}` (substituted from SSM at apply time, CS-10929).",
+        "fieldConfig": {
+          "defaults": {},
+          "overrides": []
+        },
         "gridPos": {
           "h": 8,
           "w": 24,

(Run: https://github.com/cardstack/boxel/actions/runs/26161560752)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Grafana preview

Preview deployed for 1 dashboard in the staging Grafana.
Cross-dashboard drill-throughs still point at the canonical staging dashboards.

Dashboards:

Preview is torn down automatically when this PR is closed or merged.

(Run: https://github.com/cardstack/boxel/actions/runs/26161560825)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Preview deployments

Host Test Results

    1 files  ±0      1 suites  ±0   1h 31m 58s ⏱️ - 4m 2s
2 712 tests ±0  2 697 ✅ +1  15 💤 ±0  0 ❌ ±0 
2 731 runs  ±0  2 716 ✅ +2  15 💤 ±0  0 ❌  - 1 

Results for commit a82ac3f. ± Comparison against earlier commit 434ac24.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   8m 13s ⏱️ +16s
1 453 tests +1  1 452 ✅ +1  0 💤 ±0  1 ❌ ±0 
1 544 runs  +1  1 543 ✅ +1  0 💤 ±0  1 ❌ ±0 

Results for commit a82ac3f. ± Comparison against earlier commit 434ac24.

For more details on these errors, see this check.

@backspace backspace changed the title feat: shared preview-realm GitHub Actions (split off from #4851) Extract preview/sync GitHub Actions May 20, 2026
@backspace backspace changed the base branch from main to cs-11161-extract-workspace-sync-action May 20, 2026 00:27
@backspace backspace force-pushed the cs-11180-extract-shared-preview-realm-github-actions-to-monorepo branch from 79657eb to d7095f0 Compare May 20, 2026 00:36
Extract the publish-preview-realm / unpublish-preview-realm /
workspace-sync composite actions so `boxel-catalog`, `boxel-home`,
`boxel-skills` (and any future consumer) can stop maintaining
duplicated bespoke preview-realm workflows.

This branch is layered on top of cs-11161 (#4851) so the bundled
demo workflow can exercise `boxel realm publish` / `unpublish` /
`push` end-to-end against the CLI commits in this branch's
ancestry. Once #4851 lands, GitHub will auto-rebase this PR's base
onto main and the diff will stay clean against main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@backspace backspace force-pushed the cs-11180-extract-shared-preview-realm-github-actions-to-monorepo branch from d7095f0 to 434ac24 Compare May 20, 2026 12:09
@backspace backspace changed the base branch from cs-11161-extract-workspace-sync-action to main May 20, 2026 12:09
Node's fetch always reports `TypeError: fetch failed` as `error.message`;
the actual transport reason (ECONNRESET, TLS handshake error, undici
socket error, ENOTFOUND, GOAWAY, etc.) is stashed on `error.cause` and
was being silently dropped by the publish/unpublish error paths. That
left the action-demo workflow showing a bare "Error: fetch failed" with
no way to distinguish a real network issue from, say, a self-signed
cert problem against the published-realm subdomain.

Wrap the three swallowed sites:

- `publish.ts` `.action()` catch: log `err.cause` separately if present.
- `publish.ts` `waitForPublishedRealmReady`: capture cause into the
  `lastError` string so the readiness-timeout error reports the same
  thing the polling loop kept hitting.
- `unpublish.ts` `unpublishRealm`: embed cause into the `result.error`
  string the CLI surfaces.

This is the diagnostic the action-demo on #4897 needs to figure out
why publish hangs at the initial POST despite the server-side mount
completing successfully.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant